<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title th:text="#{commissionpage.title}"></title>
        <meta name="description" content="" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
        
        <!--[if lte IE 9]>
        <link rel="stylesheet" href="css/ie.css" type="text/css" media="screen" />
        <![endif]-->

		<link rel="stylesheet" href="css/css.css" th:href="@{/css/min.css}"/>            
		<!--[if lte IE 7]>
		<script rel="stylesheet" src="../js/lte-ie7.js" ></script>
		<![endif]-->
        <script src="http://lib.sinaapp.com/js/jquery/1.9.0/jquery.min.js" th:src="@{http://lib.sinaapp.com/js/jquery/1.9.0/jquery.min.js}"></script>
        <script th:inline="javascript">/*<![CDATA[*/
        window.jQuery || document.write('<script src="'+ /*[[@{/js/vendor/jquery-1.9.0.min.js}]]*/ 'js/vendor/jquery-1.9.0.min.js'
        		+'"><\/script>')
        /*]]>*/</script>
        <script type="text/javascript" th:src="@{/js/econgen.js}"></script>
        <script th:inline="javascript">/*<![CDATA[*/
        /*]]>*/</script>
    </head>
    <body>
        <header th:substituteby="common/template::header"></header>
        
        <div class="container" style="margin-top: 20px">
        	<div class="row" th:unless="${crPage}">
        		<h1 th:text="#{commissionpage.content.nodata}"></h1>
        	</div>
        	<div class="row" th:if="${crPage}">
        		<div class="table">
        			<div class="title">
        				<h3 th:text="${session.session_user.username} + ': ' + ${session.session_user.firstName} + ' ' + ${session.session_user.lastName} + '  ' + #{commissionpage.content.table.title}"></h3>
        				<ul class="table-op">
        					<li><a th:href="@{/i}" th:title="#{table.back}"><i class="icon-undo-2"></i></a></li>
        				</ul>
        			</div>
        			<table>
        				<thead>
        					<tr>
        						<th th:text="#{commissionpage.content.table.header1}"></th>
        						<th th:text="#{commissionpage.content.table.header2}"></th>
        						<th th:text="#{commissionpage.content.table.header3}"></th>
        						<th th:text="#{commissionpage.content.table.header4}"></th>
        					</tr>
        				</thead>
        				<tbody>
        					<tr th:each="cr : ${crPage.content}">
        						<td th:text="${cr.brokerName}"></td>
        						<td th:text="${cr.accountNo}"></td>
        						<td th:text="${cr.commission}?${#numbers.formatDecimal(cr.commission,1,5)}"></td>
       							<td th:text="${cr.time}?${#dates.format(cr.time, 'yyyy-MM-dd HH:mm:ss')}"></td>
        					</tr>
        					<tr th:if="${#arrays.isEmpty(crPage.content)}">
        						<td colspan="3" th:text="#{table.nodata}"></td>
        					</tr>
        				</tbody>
        			</table>
        			<div class="table-foot">
        				<div class="table-foot-info" th:text="#{table.foot.datainfo(${crPage.totalElements}, ${crPage.totalPages})}"></div>
        				<div class="table-foot-pagination">
        					<ul>
        						<li th:class="${crPage.firstPage}?'pagination-disabled'">
        							<span th:if="${crPage.firstPage}" th:text="#{table.pagination.firstpage}"></span>
        							<a th:if="${not crPage.firstPage}" th:href="@{'/i/commission/0'}" th:text="#{table.pagination.firstpage}"></a>
        						</li>
        						<li th:class="${not crPage.hasPreviousPage()}?'pagination-disabled'">
        							<span th:if="${not crPage.hasPreviousPage()}" th:text="#{table.pagination.previouspage}"></span>
        							<a th:if="${crPage.hasPreviousPage()}" th:href="@{'/i/commission/' + ${crPage.number-1}}" th:text="#{table.pagination.previouspage}"></a>
        						</li>
        						
        						<li th:if="${crPage.totalPages &lt;= 5}" th:each="item:${new int[crPage.totalPages]}" th:class="${crPage.number == itemStat.index}?'paginaton-actived'">
        							<a th:if="${crPage.number != itemStat.index}" th:text="${itemStat.count}" th:href="@{'/i/loginLog/' + ${itemStat.index}}"></a>
        							<span th:if="${crPage.number == itemStat.index}" th:text="${itemStat.count}"></span>
        						</li>
        						<li th:if="${crPage.totalPages > 5} and ${crPage.totalPages >= crPage.number + 3} and ${crPage.number >= 3}" th:each="item:${new int[5]}" th:class="${itemStat.index == 2}?'paginaton-actived'">
        							<a th:if="${itemStat.index != 2}" th:text="${crPage.number + itemStat.count - 2}" th:href="@{'/i/loginLog/' + ${crPage.number + itemStat.index - 2}}"></a>
        							<span th:if="${itemStat.index == 2}" th:text="${crPage.number + 1}"></span>
        						</li>
        						<li th:if="${crPage.totalPages > 5} and ${crPage.number &lt; 3}" th:each="item: ${new int[5]}" th:class="${crPage.number == itemStat.index}?'paginaton-actived'">
        							<a th:if="${crPage.number != itemStat.index}" th:text="${itemStat.count}" th:href="@{'/i/loginLog/' + ${itemStat.index}}"></a>
        							<span th:if="${crPage.number == itemStat.index}" th:text="${itemStat.count}"></span>
        						</li>
        						<li th:if="${crPage.totalPages > 5} and ${crPage.number + 3 > crPage.totalPages}" th:each="item:${new int[5]}" th:class="${crPage.totalPages - crPage.number + itemStat.index == 5}?'paginaton-actived'">
        							<a th:if="${crPage.totalPages - crPage.number + itemStat.index != 5}" th:text="${crPage.totalPages - 5 + itemStat.count}" th:href="@{'/i/loginLog/' + ${crPage.totalPages - 5 + itemStat.index}}"></a>
        							<span th:if="${crPage.totalPages - crPage.number + itemStat.index == 5}" th:text="${crPage.totalPages - 5 + itemStat.count}"></span>
        						</li>
        						
        						<li th:class="${not crPage.hasNextPage()}?'pagination-disabled'">
        							<span th:if="${not crPage.hasNextPage()}" th:text="#{table.pagination.nextpage}"></span>
        							<a th:if="${crPage.hasNextPage()}" th:href="@{'/i/commission/' + ${crPage.number+1}}" th:text="#{table.pagination.nextpage}"></a>
        						</li>
        						<li th:class="${crPage.lastPage}?'pagination-disabled'">
        							<span th:if="${crPage.lastPage}" th:text="#{table.pagination.lastpage}"></span>
        							<a th:if="${not crPage.lastPage}" th:href="@{'/i/commission/' +  ${crPage.totalPages - 1}}" th:text="#{table.pagination.lastpage}"></a>
        						</li>
        					</ul>
        				</div>
        			</div>
        		</div>
        	</div>
        </div>

        <footer th:substituteby="common/template::footer"></footer>
        
    </body>
</html>
